import api from '../index'
import type { ResponseData,PagingData, pageParam } from '../type'

export interface CheckInFig {
	isday : boolean
	backgroundUrl : string
	list : Array<{
		rewardWhither : string
		pint : string
		extraPint : string
		extraStatus : string
		extraRewardType : number
		extraRewardWhither : string
		isCheck : boolean
	}>
}
// 签到配置
export const getCheckFig = () =>
	api.get<ResponseData<CheckInFig>>('customer/api/check/getCheckFig', {
	}
	)

// 签到
export const userCheck = () =>
	api.post('customer/api/check/userCheck')

// 获取签到规则
export const getRegulationTxt = () =>
	api.get<ResponseData<string>>('customer/api/check/getRegulationTxt')
	
export interface CheckLogItem {
	id:number
	remark:string
	createTime:string
	point:string
}
// 签到记录
export const getCheckLogList = (data:pageParam) =>
	api.get<ResponseData<PagingData<CheckLogItem>>>('customer/api/check/list', {
		data
	})